<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head th:replace="common/head"></head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <th:block th:replace="common/header"></th:block>
    <th:block th:replace="common/nav"></th:block>

    <div class="content-wrapper">
        <section class="content-header">
            <h1>
                系统管理
                <small>角色管理新增/修改</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="/index"><i class="fa fa-dashboard"></i> 首页</a></li>
                <li><a href="#">角色管理</a></li>
                <th th:if="${xsRoleDto.mode==0}">
                <li><a href="#">角色添加</a></li>
                </th>
                <th th:if="${xsRoleDto.mode==1}">
                <li><a href="#">角色编辑</a></li>
                </th>

            </ol>
        </section>

        <section class="content">
            <div class="row">
                <div class="col-xs-12">
                    <div class="box box-info">
                        <div class="box-header with-border">
                            <th th:if="${xsRoleDto.mode==0}">
                            <h3 class="box-title">角色信息添加</h3>
                            </th>
                            <th th:if="${xsRoleDto.mode==1}">
                            <h3 class="box-title">角色信息编辑</h3>
                            </th>
                        </div>
                        <!-- /.box-header -->
                        <!-- form start -->
                        <form class="form-horizontal" action="/xsRole/operate" method="post" >
                            <input type="hidden" name="roleId" th:value="${xsRoleDto.roleId}">
                            <input type="hidden" name="mode" th:value="${xsRoleDto.mode}">

                            <div class="box-body">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">角色名称*</label>
                                    <div class="col-sm-4">
                                        <input name="roleName" type="text" id="roleName" class="form-control" required="required" th:value="${xsRoleDto.roleName}" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">描述</label>
                                    <div class="col-sm-4">
                                        <input name="remark" type="text" id="remark" class="form-control" th:value="${xsRoleDto.remark}" />
                                    </div>
                                </div>
                            </div>
                            <!-- /.box-body -->
                            <div class="box-footer">
                                <th th:if="${xsRoleDto.mode==0}">
                                <a href="list" class="btn btn-default">取 消</a>
                                <button  type="submit" class="btn btn-info pull-right submit">提 交</button>
                                </th>
                                <th th:if="${xsRoleDto.mode==1}">
                                <a href="list" class="btn btn-default">取 消</a>
                                <button type="submit" class="btn btn-info pull-right submit">提 交</button>
                                </th>
                            </div>
                            <!-- /.box-footer -->
                        </form>
                    </div>

                    <!-- /.box -->
                </div>
            </div>
            <!-- /.row -->
        </section>
    </div>

    <th:block th:replace="common/footer"></th:block>
</div>

<th:block th:replace="common/script"></th:block>
</body>
</html>
